import { useRoute } from "vue-router";

export function useQueryParams(params) {
  // 获取路由实例
  const route = useRoute();
  if(!(route && route.query)){
    return
  }
  const keys = Object.keys(route.query)
  if(keys && keys.length){
    keys.forEach(key=>params[key] = route.query[key])
  }
}
